import strutils

proc hey*(ask: string): string = 
  var
    question = ask.strip.endsWith('?')
    silence = ask.isNilOrWhitespace
    yell = ask.contains(Letters) and ask.toUpper == ask

  if question:
    if yell:
      "Calm down, I know what I'm doing!"
    else:
      "Sure."
  elif silence:
    "Fine. Be that way!"
  elif yell:
    "Whoa, chill out!"
  else:
    "Whatever."